import Clipboard from 'clipboard'
import {
  Toast
} from 'vant'
export default function handleClipboard(text, event) {
  const clipboard = new Clipboard(event.target, {
    text: () => text
  })
  clipboard.on('success', () => {
    Toast({
      message: '复制成功',
      position: 'top',
    });
  })
  clipboard.onClick(event)
}
